package com.ibuonline.b2b.entity;

import java.io.Serializable;

public class SysFunction implements Serializable {

	private static final long serialVersionUID = 6498519181884320617L;

	//fields
	private java.lang.Integer functionId;
	private java.lang.String functionName;
	private java.lang.String functionDesc;
	private java.lang.String url;
	private java.lang.Integer moduleId;

	//default constructor
	public SysFunction() {
	}

	//getter
	public java.lang.Integer getFunctionId() {
		return functionId;
	}
	public java.lang.String getFunctionName() {
		return functionName;
	}
	public java.lang.String getFunctionDesc() {
		return functionDesc;
	}
	public java.lang.String getUrl() {
		return url;
	}
	public java.lang.Integer getModuleId() {
		return moduleId;
	}

	//setter
	public void setFunctionId(java.lang.Integer functionId) {
		this.functionId = functionId;
	}
	public void setFunctionName(java.lang.String functionName) {
		this.functionName = functionName;
	}
	public void setFunctionDesc(java.lang.String functionDesc) {
		this.functionDesc = functionDesc;
	}
	public void setUrl(java.lang.String url) {
		this.url = url;
	}
	public void setModuleId(java.lang.Integer moduleId) {
		this.moduleId = moduleId;
	}

	//equals method
	public boolean equals(Object other) {
		if (this == other)
			return true;
		if (!(other instanceof SysFunction))
			return false;

		final SysFunction sysFunction = (SysFunction)other;
		if (!this.functionId.equals(sysFunction.getFunctionId()))
			return false;

		return true;
	}

	//hashCode method
	public int hashCode() {
		StringBuffer keys = new StringBuffer();
		keys.append(functionId).append(",");
		if (keys.length() > 0)
			keys.deleteCharAt(keys.length() - 1);
		return keys.toString().hashCode();
	}

	//toString method
	public String toString() {
		return new StringBuilder("SysFunction[")
			.append("functionId=").append(functionId).append(", ")
			.append("functionName=").append(functionName).append(", ")
			.append("functionDesc=").append(functionDesc).append(", ")
			.append("url=").append(url).append(", ")
			.append("moduleId=").append(moduleId).append("]").toString();
	}
}